package com.unknowpupil.design.mediator;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: <p>
 *  总经理
 * </p>
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2020/4/28 14:10
 * @Classname: President
 * @Version: 1.0
 */
public class President implements Mediator {
    /**存放同事类*/
    private Map<String , Department> map = new HashMap<>();

    @Override
    public void register(String dname, Department d) {
        map.put(dname,d);
    }

    @Override
    public void command(String dname) {
        map.get(dname).selfAction();
    }
}
